package annotation;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public class TestAnnotation {
	@Retention(value=RetentionPolicy.RUNTIME)
	@interface MyFactory{
		public String name() default "mldn";
		public String val();
	}
	@MyFactory(val="hello")
	@SuppressWarnings("serial")
	@Deprecated
	class Student implements Serializable{
		
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
	Class<?>  class1=Student.class;
	MyFactory an=class1.getAnnotation(MyFactory.class);
	System.out.println(an.name());
	System.out.println(an.val());
	System.out.println(an.val());
	
	}

}
